package ui;

import java.awt.Dimension;
import javax.swing.JFrame;

@SuppressWarnings("serial")
public class MainFrame extends JFrame{

	public MainFrame(String title, int width, int height) {
		add(new MainPanel());
		setTitle(title);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(width, height);
		setLocationRelativeTo(null);
		setResizable(false);
		setVisible(true);
		
		// Set content size
		getContentPane().setPreferredSize(new Dimension(width, height));
		pack();
		
		addKeyListener(MainPanel.instance.currentInput);
	}

	public static void main(String[] args) {
		new MainFrame("ZBase", 800, 600);
	}

}
